home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / midi / mdSetStampMode.z / mdSetStampMode
Encoding:
Text File  |  1998-10-20  |  7.2 KB  |  133 lines

  1.  
  2.  
  3.  
  4. mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))                                        mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      mdGetStampMode, mdSetStampMode - control time stamping for an MDport
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////mmmmiiiiddddiiii....hhhh>>>>
  13.  
  14.      iiiinnnntttt mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((MMMMDDDDppppoooorrrrtttt ppppoooorrrrtttt,,,, iiiinnnntttt mmmmooooddddeeee))))
  15.  
  16.      iiiinnnntttt mmmmddddGGGGeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((MMMMDDDDppppoooorrrrtttt ppppoooorrrrtttt))))
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee controls the interpretation of the stamp field in an
  20.      MDevent by the port.  The available interpretation modes are _M_D__N_O_S_T_A_M_P,
  21.      _M_D__D_E_L_T_A_S_T_A_M_P, _M_D__R_E_L_A_T_I_V_E_S_T_A_M_P, _M_D__R_E_L_A_T_I_V_E_T_I_C_K_S and _M_D__D_E_L_T_A_T_I_C_K_S.
  22.  
  23.      If an output port is in MD_NOSTAMP mode, the interface will ignore the
  24.      stamp and transmit the event immediately. On input, events are stamped
  25.      with the UST (unadjusted system time) corresponding to the arrival time
  26.      of the final byte in the message.
  27.  
  28.      In MD_DELTASTAMP mode, the stamp contains the number of nanoseconds
  29.      between the event and its predecessor.  If the stamp is 0, the two events
  30.      are logically coincident in time.  On output, if the stamp is non-zero,
  31.      the event will be transmitted the specified number of nanoseconds after
  32.      the preceeding event.
  33.  
  34.      In MD_RELATIVESTAMP mode, stamps are relative to the port's origin time
  35.      (see mmmmddddSSSSeeeettttSSSSttttaaaarrrrttttPPPPooooiiiinnnntttt((((3333ddddmmmm))))).  A time stamp of 0 indicates that the event
  36.      was received or transmitted at the origin UST.  If an event with a stamp
  37.      of nnnn is sent to an interface in this mode, the driver will transmit the
  38.      event nnnn nanoseconds after the origin time.  If the application falls
  39.      behind and transmits events whose stamps indicate that the event should
  40.      have been sent sometime in the past, the event will be transmitted
  41.      immediately.  If an event with a stamp of nnnn is received, then the last
  42.      byte of the event arrived nnnn nanoseconds after the origin time.
  43.  
  44.      MD_RELATIVETICKS and MD_DELTATICKS set the MDport into a mode that allows
  45.      the use of ticks instead of real time to control the timing of MIDI
  46.      events.  Ticks are defined in terms compatible with Standard MIDI files;
  47.      at any given point, the duration of a tick is equal to the number of
  48.      microseconds per quarter note (as set by mmmmddddSSSSeeeettttTTTTeeeemmmmppppoooo or a tempo event)
  49.      multiplied by the current tempo scaling value (set with mmmmddddSSSSeeeettttTTTTeeeemmmmppppoooossssccccaaaalllleeee)
  50.      and divided by the current number of divisions (set with mmmmddddSSSSeeeettttDDDDiiiivvvviiiissssiiiioooonnnn).
  51.      The advantage of this mode is that the duration of each beat can be
  52.      changed (either synchronously with a tempo event or asynchronously with
  53.      mmmmddddSSSSeeeettttTTTTeeeemmmmppppooooSSSSccccaaaalllleeee)))) wwwwiiiitttthhhhoooouuuutttt aaaalllltttteeeerrrriiiinnnngggg tttthhhheeee ssssttttaaaammmmppppssss oooonnnn tttthhhheeee eeeevvvveeeennnnttttssss....
  54.      MMMMDDDD____RRRREEEELLLLAAAATTTTIIIIVVVVEEEETTTTIIIICCCCKKKKSSSS aaaalllllllloooowwwwssss tttthhhheeee ttttiiiicccckkkkssss ttttoooo bbbbeeee rrrreeeecccckkkkoooonnnneeeedddd ffffrrrroooommmm aaaannnn oooorrrriiiiggggiiiinnnn ttttiiiicccckkkk tttthhhhaaaatttt
  55.      iiiissss sssseeeetttt wwwwiiiitttthhhh mmmmddddSSSSeeeettttSSSSttttaaaarrrrttttPPPPooooiiiinnnntttt((((3333AAAA))))....  MMMMDDDD____DDDDEEEELLLLTTTTAAAATTTTIIIICCCCKKKKSSSS uuuusssseeeessss ssssiiiimmmmpppplllleeee ddddeeeellllttttaaaa ttttiiiicccckkkkssss,,,,
  56.      wwwwhhhheeeerrrreeee tttthhhheeee ssssttttaaaammmmpppp''''ssss vvvvaaaalllluuuueeee iiiinnnnddddiiiiccccaaaatttteeeessss hhhhoooowwww mmmmaaaannnnyyyy ttttiiiicccckkkkssss ffffaaaallllllll bbbbeeeettttwwwweeeeeeeennnn tttthhhhiiiissss eeeevvvveeeennnntttt
  57.      aaaannnndddd tttthhhheeee ttttiiiimmmmeeee aaaatttt wwwwhhhhiiiicccchhhh iiiittttssss pppprrrreeeeddddeeeecccceeeessssssssoooorrrr wwwwaaaassss ttttrrrraaaannnnssssmmmmiiiitttttttteeeedddd....
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))                                        mmmmddddSSSSeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  75.      An application should set the stamping mode immediately after a port is
  76.      opened.  Once set, the stamping mode should not be changed again.
  77.  
  78.  
  79. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  80.      mmmmddddGGGGeeeettttSSSSttttaaaammmmppppMMMMooooddddeeee returns the current stamp mode for the port.
  81.      mdSetStampMode returns 0 on success and -1 on error.  The following error
  82.      codes are expected:
  83.  
  84.      EINVAL   - An undefined stamp mode was specified.
  85.  
  86.  
  87. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  88.      mdSetTempo(3dm), mdSetTemposcale(3dm), mdSetDivision(3dm)
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.